
#ifndef TCWall_HELPER_H
#define TCWall_HELPER_H
#include "TC_Wall.h"
#include <list>
namespace TCWallHelper{
	struct VertexObject{
		AcDbObjectId ObjectId;
		int VertexIndex;
	};
void curveTextMulti();
void curvetextEdit(AcDbObjectIdArray& curvesArray);
void setStart();
void setStart(AcDbObjectId id);
void setEnd();
void setEnd(AcDbObjectId id);
void reverse();
void reverse(AcDbObjectIdArray& idArray);
void ShowCurve();
void HideCurve();
void ShowCurve(bool show);
void ShowCurve(bool show, AcDbObjectIdArray& curvesArray);
void ShowText();
void HideText();
void ShowText(bool show);
void ShowText(bool show, AcDbObjectIdArray& curvesArray);
void fit();
void DoNotFit();
void setFit(bool fit);
void setFit(bool fit, AcDbObjectIdArray& curvesArray);
void RepeatText();
void DoNotRepeatText();
void repeatText(bool repeat);
void repeatText(bool repeat, AcDbObjectIdArray& curvesArray);
void createWall();
//void				setDefaultValues(AsdkCurveText* pCurveText);
//void				setInitialValues(AsdkCurveText* pCurveText, class GLOBALS &glob, bool isDefault);
bool checkWallJoins(TC_Wall* StartWall);
int joinWall(TC_Wall * curWall, AcDbObjectIdArray WallIdArray );
int joinWall(AcDbObjectId curWallId);
int joinWall(TC_Wall * curWall);
bool linkVertexObject(TC_Wall* curWall, int vertexIndex, AcDbObjectId nextObjectId, int nextBaseVertexIndex, TC_Wall* hasOpendWall);
void insertEdgeObject(TC_Wall* curWall, int vertexIndex, AcDbObjectId nextObjectId, int nextBaseVertexIndex);
void breakVertexObjects(TC_Wall* curWall);
int getTest2SquaresPos( AcGePoint3dArray squ1, AcGePoint3dArray squ2,int & crossType, int& crossVertexIndex1, int& crossVertexIndex2, AcGePoint3d& crossPoint1, AcGePoint3d& crossPoint2, double& tc1, double & tc2);
bool Test2SquaresTopJoins( AcGePoint3dArray squ1, AcGePoint3dArray squ2, int& crossVertexIndex1, int& crossVertexIndex2);
bool getVertexAllObjectId(TC_Wall* openedWall, AcDbObjectId ObjectId, int VertexIndex,std::list<VertexObject>& VertexObjects);
bool containVertexObjectId(std::list<VertexObject>& VertexObjects, AcDbObjectId ObjectId, int VertexIndex);
}

#endif